Island Man:
"Jesus didn't condemn public prayer. Jesus himself prayed publicly on occasion such as when he raised up Lazarus. What Jesus condemned was praying publicly for the purpose of impressing others with your righteousness."
Jesus did not say "Don't pray hypocritically in public" he was emphasizing private prayer in order to prevent the mere appearance of hypocrisy.
"But when you pray, go into your room, close the door and pray to your Father, who is unseen. Then your Father, who sees what is done in secret, will reward you." - Matthew 6:6 New International Version
1 Corinthians 14:16 referred to prayers made amongst believers.
As for Lazarus' resurrection Jesus would be the exception to his own rule. He was trying to impress others. Same thing would apply to his followers when working miracles in his name not just prayers in general.